package guoanmaker.operator.business.repository;



import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.operator.business.model.PerviderDictionary;



/**
 * 
* @ClassName: ProviderDictionaryRepository
* @Description:数据字典 (这里用一句话描述这个类的作用) 
* @author lihongyu
* @date 2017年7月10日 下午2:35:29 
*  
 */
public interface ProviderDictionaryRepository
extends JpaRepository<PerviderDictionary,String>,JpaSpecificationExecutor<PerviderDictionary> {
	
	 @Query("select t from PerviderDictionary t where t.fatherID = :fatherID ")
	    List<PerviderDictionary> findAllByfatheridList(@Param("fatherID") String fatherID);
	 /**
	  * 
	     * @Title: selectBydictNameAndfatherID  
	     * @Description: 根据dictName,fatherID查询单位是否存在  
	     * @param @param dictName
	     * @param @param fatherID
	     * @param @return      
	     * @return List<PerviderDictionary>      
	     * @throws
	  */
	 @Query("select t from PerviderDictionary t where t.dictName = :dictName and t.fatherID = :fatherID")
	 List<PerviderDictionary> selectBydictNameAndfatherID(@Param("dictName") String dictName, @Param("fatherID") String fatherID);
	

}
